package com.osmino.contacts.model.contacts;

public final class ContactBuilderAndroid implements IContactBuilder {

	private final boolean DBG = true;

	IContact contact;

	public ContactBuilderAndroid() {
		contact = new ContactAndroid();
	}
	
	public ContactBuilderAndroid(IContact contact){
		if(contact==null) throw new NullPointerException("ContactBuilderAndroid: constructor arg == null");
		this.contact = contact;
	}
	
	@Override
	public IContact create() {
		if (DBG)
			System.out.println( contact.toString() );
		return contact;
	}

	@Override
	public ContactBuilderAndroid set(String which, Object data) {
		contact.setData(which, data);
		return this;
	}
}